package example.lec01.anno;

import java.lang.annotation.*;


@Retention(RetentionPolicy.RUNTIME)
@Documented
@interface SingleValue {
    String str() default "hello world";
    int value() default 1;
}

public class Foo2 {
    @SingleValue(1)
    public static void m1(int a) {
        if (a < 0) {
            throw new RuntimeException("Crash");
        }
    }

    public static void m2() { }

    @SingleValue(value=-2)
    public static void m3(int a) {
        if (a < 0) {
            throw new RuntimeException("Crash");
        }
    }

    public static void m4() { }

    @SingleValue
    public static void m5() { }

    public static void m6() { }

    @SingleValue
    public static void m7() {
        throw new RuntimeException("Crash");
    }

    public static void m8() { }
}
